home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
batch
/
when11
/
whenisit.doc
< prev
next >
Wrap
Text File
|
1992-01-05
|
9KB
|
245 lines
WHENISIT 1.1 |
A Batch File Utility to Tell Time
Copyright 1991,1992 by Chuck Steenburgh |
WHENISIT is a highly flexible utility to provide control in
DOS batch files based on time and date. With its many op-
tions, WHENISIT will allow your batch files to determine the
year, month, date, day of the week, hour, minute, second, or
whether it is morning or afternoon and make intelligent de-
cisions based on this information. WHENISIT is also able to |
perform actions once a day (such as at the first boot-up of the |
day). |
For example, you may want certain actions performed at
boot time on certain days of the week or month. Adding
WHENISIT to your AUTOEXEC.BAT file can allow you to make
these sort of decisons. (Or allow your computer to make them
for you automatically.)
Usage:
WHENISIT [option]
where [option] is one of the following:
/? Displays help screen |
/a Returns errorlevel based on am or pm
/d Returns errorlevel equal to date
/h Returns errorlevel equal to the hour
(24-hour clock)
/m Returns errorlevel equal to month
/mi Returns errorlevel equal to minute
/s Returns errorlevel equal to second
/w Returns errorlevel based on the day
of the week
/y Returns errorlevel equal to the last
two digits of the year.
Entering WHENISIT alone on the command line will generate an |
errorlevel of 1 if WHENISIT has not been executed yet that day. |
Otherwise, an errorlevel of 0 will be returned. Note that if |
you maintain multiple copies of WHENISIT.EXE on your system, |
each copy of WHENISIT will keep track of whether or not it has |
run separately from any other copies. Be sure you know which |
copy you are executing! This is useful to put in AUTOEXEC.BAT |
Page 1
to indicate actions you want performed only ONCE each day, no |
matter how many times you re-boot your computer. (Once-a-day |
mode) |
Examples:
WHENISIT /a Returns errorlevel of 2 if it is pm,
or 1 if it is am.
WHENISIT /y If your clock is set to the year
1991, returns an errorlevel of 91.
WHENISIT /w If your clock indicates that it is
Tuesday, returns an errorlevel of 3.
WHENISIT Returns errorlevel of 0 if WHENISIT |
has already executed, 1 if not. |
Errorlevel Chart:
Errorlevel Switch: /a /m /d
---------- --------------------------------------
1 AM January Sunday
2 PM February Monday
3 na March Tuesday
4 na April Wednesday
5 na May Thursday
6 na June Friday
7 na July Saturday
8 na August na
9 na September na
10 na October na
11 na November na
12 na December na
The errorlevels returned through the use of other switches
should be self-explanatory. If an error occurs, the an error-
level of 0 will be returned.
DISCLAIMER
The programs described in this documentation are guaran-
teed to do absolutely nothing! They have, however, in my exper-
ience performed essentially as described herein. The author
will not be responsible for any loss or damages caused through
the use of these programs.
All trademarks are property of their respective owners.
The programs and documentation are Copyright 1991,1992 by
Chuck Steenburgh. You are encouraged to distribute these pro-
grams provided the following conditions are met:
Page 2
- all files contained in the archive or distribution disk
must be distributed together in UNMODIFIED form
- you charge no more than a reasonable fee for copying or
subscription, and clearly indicate that payment of such
a fee does NOT grant ownership of the programs.
This program is part of set of utilities known as STEEN-
BURGH'S STUFF (Mildly Useful Utilities). The full set of
utilities includes the following programs:
BATBOX: Simple menu creation/input system
CLK: Displays time on screen
DOSVER: Checks for DOS version currently running
FREEDISK: Checks for available disk space
HOWMUCH: Displays space occupied by a group of files
INPUT: Simple prompt/input system
KLS: Colorful screen-clearing utility
LAUNCHER: File selection/execution system
MUSIC: Plays transcribed sheet music on the PC
RAND: Random number generator
SKIP: Prints blank lines from batch files
SOUNDER: Wide range of noise making options
WAITFOR: Timed pauses
WHENISIT: Date/time telling utility
WRITE: Colorful output anywhere on screen
XD: Create/switch directories at the same time
Payment of the $10 registration fee automatically registers
you for the full set.
You may evaluate these programs for up to 30 days on a free
trial basis. After 30 days, you should register your use of
these programs. The registration fee is $10, payable to the
author at the address given below.
Let's be real: I don't plan to make alot of money this way.
Registration does have its advantages:
- I am improving these programs all the time. Registration
will get you IMMEDIATELY a disk with the latest version,
which includes a version of BATBOX with user-selected
menu colors. When Version 2.0 of these utilities is re-
leased, you will also receive that free of charge.
- While I can't promise to include everyone's suggestions
in program updates, you can bet I'll listen to registered
users before any of you scrounges out there.
- You will me feel all warm and fuzzy and appreciated, and
all that good stuff.
- You will also get an evaluation copy of my text-file for-
matting program (used to produce the margins in this doc-
Page 3
ument).
Send comments/registrations to:
Chuck Steenburgh
304A North Main Street
Lexington, VA 24450
(703)464-5290
CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
Page 4